import request from '@/utils/request'

// 查询股东信息列表
export function listInternalShareholder(query) {
  return request({
    url: '/shareholder/internalShareholder/list',
    method: 'get',
    params: query
  })
}

// 查询股东信息详细
export function getInternalShareholder(id) {
  return request({
    url: '/shareholder/internalShareholder/' + id,
    method: 'get'
  })
}

// 保存股东信息
export function saveInternalShareholder(data) {
  return request({
    url: '/shareholder/internalShareholder/save',
    method: 'post',
    data: data
  })
}

// 删除股东信息
export function delInternalShareholder(id) {
  return request({
    url: '/shareholder/internalShareholder/' + id,
    method: 'delete'
  })
}

// 导出股东信息
export function exportInternalShareholder(query) {
  return request({
    url: '/shareholder/internalShareholder/export',
    method: 'get',
    params: query
  })
}
// 根据类型查询内部机构或者基金
export function getShareholderOrFundByType(type) {
  return request({
    url: '/shareholder/internalShareholder/type/' + type,
    method: 'get'
  })
}

// 查询股东信息详细
export function unique(name, id, dealId) {
  return request({
    url: '/shareholder/internalShareholder/unique?name=' + name + '&id=' + id + '&dealId=' + dealId,
    method: 'get'
  })
}
